<?php 
static $is_first = true;
if ($is_first) {
    echo '<script type="text/javascript" src="' .(tos_cdn_url('js/richtext.js')) . '"></script>';
    $is_first = false;
}
$element_id = $this->get_data('element_id');
if (empty($element_id)) {
    $element_id = 'textarean_' . time();
}
?>
<textarea id="<?php echo $element_id;?>" name="<?php $this->write('element_name'); ?>" class="content required" id="<?php echo $element_id;?>" name="content"><?php $this->write('element_value');?></textarea>
<script type="text/javascript">
var rt = new z.richtext({
    elem: '<?php echo $element_id;?>'
});
</script>